/*
 * $Id: bench.h,v 1.5 1996/06/25 10:32:48 abrown Exp $
 */
#include        <stdio.h>
#include        <unistd.h>
#include        <sys/types.h>
#include        <signal.h>
#include        <errno.h>

#define	TCP_XACT	3962
#define	TCP_CONTROL	3963
#define	TCP_DATA	3964
#define	TCP_CONNECT	3965
#define	UDP_XACT 	(u_long)3966	/* XXX - unregistered */
#define	UDP_DATA 	(u_long)3967	/* XXX - unregistered */
#define	VERS		(u_long)1

/*
 * socket send/recv buffer optimizations
 */
#define	SOCKOPT_READ	0
#define	SOCKOPT_WRITE	1
#define	SOCKOPT_RDWR	2
#define	SOCKOPT_NONE	4

#define	SOCKBUF		(1024*1024)
#define	SOCKSTEP	(16*1024)

#ifdef SYS5
#define	bzero(b, len)	memset(b, 0, len)
#define	bcopy(s, d, l)	memcpy(d, s, l)
#define	rindex(s, c)	strrchr(s, c)
#endif

#define	ulong	unsigned long
#define	GO_AWAY	signal(SIGALRM, exit); alarm(60 * 60);

char	last();
int 	parse_bytes();

void		init_timing();
unsigned int	gen_iterations();

void	output_bandwidth();

void	centeravg_reset();
void	centeravg_add();
void 	centeravg_done();

void	exit();
void	start();
void	adjust();
void	rusage();
void	bandwidth();
void	kb();
void	mb();
void	micro();
void	milli();
void	ptime();
void	tvsub();

/*
 * Generated from msg.x which is included here:

	program XACT_PROG {
	    version XACT_VERS {
		char
		RPC_XACT(char) = 1;
    	} = 1;
	} = 3970;

 * Please do not edit this file.
 * It was generated using rpcgen.
 */


#define XACT_PROG ((u_long)3970)
#define XACT_VERS ((u_long)1)
#define RPC_XACT ((u_long)1)
#define RPC_EXIT ((u_long)2)
extern char *rpc_xact_1();
extern char *client_rpc_xact_1();
